package com.lekang.le.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.lekang.common.annotation.Excel;
import com.lekang.common.core.domain.BaseEntity;

import java.util.List;

/**
 * 楼层信息对象 floor
 * 
 * @author szh
 * @date 2025-10-14
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Floor extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 楼层名称 */
    @Excel(name = "楼层名称")
    private String floorName;

    /** 排序号 */
    @Excel(name = "排序号")
    private Long sortNo;

    /** 逻辑删除 */
    @Excel(name = "逻辑删除")
    private Long isDeleted;

    /** 额外字段1 */
    private String extraField1;

    /** 额外字段2 */
    private String extraField2;
    /**
     * 关联：当前楼层下的所有房间（1对多）
     * 说明：楼层直接关联房间，房间再关联房型（通过room中的roomType属性）
     */
    private List<Room> roomList;  // 核心修改：替换roomTypeList为roomList


    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setFloorName(String floorName) 
    {
        this.floorName = floorName;
    }

    public String getFloorName() 
    {
        return floorName;
    }

    public void setSortNo(Long sortNo) 
    {
        this.sortNo = sortNo;
    }

    public Long getSortNo() 
    {
        return sortNo;
    }

    public void setIsDeleted(Long isDeleted) 
    {
        this.isDeleted = isDeleted;
    }

    public Long getIsDeleted() 
    {
        return isDeleted;
    }

    public void setExtraField1(String extraField1) 
    {
        this.extraField1 = extraField1;
    }

    public String getExtraField1() 
    {
        return extraField1;
    }

    public void setExtraField2(String extraField2) 
    {
        this.extraField2 = extraField2;
    }

    public String getExtraField2() 
    {
        return extraField2;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("floorName", getFloorName())
            .append("sortNo", getSortNo())
            .append("isDeleted", getIsDeleted())
            .append("extraField1", getExtraField1())
            .append("extraField2", getExtraField2())
            .toString();
    }
}
